using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BusinessPlatform.Core;
using BusinessPlatform.Core.BusinessObject;
using BusinessPlatform.Core.BusinessObject.Mapping;
using BusinessPlatform.Core.BusinesObjectType;

namespace NewStartModels.Models.Authorities
{
    /// <summary>
    /// 权限
    /// </summary>
    public class Authoritier : BusinessObjectBase, IAuthoritier, ISimple
    {
        /// <summary>
        /// 权限
        /// </summary>
        public override string TableName
        {
            get { return "Authorities"; }
        }
        #region properties

        /// <summary>
        /// 用户ID
        /// </summary>
        [PropertyMapping(FieldName = "UserID", DbType = typeof(Int32))]
        public System.Int32 UserID
        {
            get { return this.GetPropertyValue<System.Int32>("UserID"); }
            set { this.SetPropertyValue<System.Int32>("UserID", value); }
        }

        /// <summary>
        /// 权限类型
        /// </summary>
        [PropertyMapping(FieldName = "AuthType", DbType = typeof(String))]
        public Data.Enumerator.BOAuthType AuthType
        {
            get { return this.GetPropertyValue<Data.Enumerator.BOAuthType>("AuthType"); }
            set { this.SetPropertyValue<Data.Enumerator.BOAuthType>("AuthType", value); }
        }

        /// <summary>
        /// 标识编码
        /// </summary>
        [PropertyMapping(FieldName = "UniqueID", DbType = typeof(Int32))]
        public System.Int32 UniqueID
        {
            get { return this.GetPropertyValue<System.Int32>("UniqueID"); }
            set { this.SetPropertyValue<System.Int32>("UniqueID", value); }
        }

        /// <summary>
        /// 权限职能
        /// </summary>
        [PropertyMapping(FieldName = "Authority", DbType = typeof(String))]
        public Data.Enumerator.BOAuthority Authority
        {
            get { return this.GetPropertyValue<Data.Enumerator.BOAuthority>("Authority"); }
            set { this.SetPropertyValue<Data.Enumerator.BOAuthority>("Authority", value); }
        }

        /// <summary>
        /// 创建人
        /// </summary>
        [PropertyMapping(FieldName = "Creator", DbType = typeof(Int32))]
        public System.Int32 Creator
        {
            get { return this.GetPropertyValue<System.Int32>("Creator"); }
            set { this.SetPropertyValue<System.Int32>("Creator", value); }
        }

        /// <summary>
        /// 创建时间
        /// </summary>
        [PropertyMapping(FieldName = "CreateDate", DbType = typeof(DateTime))]
        public System.DateTime CreateDate
        {
            get { return this.GetPropertyValue<System.DateTime>("CreateDate"); }
            set { this.SetPropertyValue<System.DateTime>("CreateDate", value); }
        }

        /// <summary>
        /// 更新人
        /// </summary>
        [PropertyMapping(FieldName = "Updator", DbType = typeof(Int32))]
        public System.Int32 Updator
        {
            get { return this.GetPropertyValue<System.Int32>("Updator"); }
            set { this.SetPropertyValue<System.Int32>("Updator", value); }
        }

        /// <summary>
        /// 更新时间
        /// </summary>
        [PropertyMapping(FieldName = "UpdateDate", DbType = typeof(DateTime))]
        public System.DateTime UpdateDate
        {
            get { return this.GetPropertyValue<System.DateTime>("UpdateDate"); }
            set { this.SetPropertyValue<System.DateTime>("UpdateDate", value); }
        }

        /// <summary>
        /// 备注
        /// </summary>
        [PropertyMapping(FieldName = "Remarks", DbType = typeof(String))]
        public System.String Remarks
        {
            get { return this.GetPropertyValue<System.String>("Remarks"); }
            set { this.SetPropertyValue<System.String>("Remarks", value); }
        }

        #endregion

        /// <summary>
        /// 权限构造函数
        /// </summary>
        public Authoritier()
        {

        }
    }
}
